<template>
	<section>
		<div>
			<template>
				<div class="box-content">													
					<h1 style="margin:10px 0">课程阶段：创业基础模块儿</h1>
					<el-table :data="courseStages[0].stageUnits"  height="200"  style="width: 100%"> 
						<el-table-column  type="index" width='80'>
						</el-table-column>						 	
					 	<el-table-column prop="name" label="作业所属小节">
					    </el-table-column>
					 	<el-table-column  label="作业对象">
					 		<template scope="scope">
					 			<p>学生</p>
					 		</template>
					    </el-table-column>
					 	<el-table-column label="提交总数/未批改数">
					 		<template scope="scope">
					 			<p>{{scope.row.commitCount}}/{{scope.row.commitCount-scope.row.publishCount}}</p>
					 		</template>					 		
					    </el-table-column>	
						<el-table-column label="操作">
							<template scope="scope">
								<el-button size="small"  @click="skip('/coursetaskstage',$route.query.id,scope.row.unitId,'1')" type="primary">查看</el-button>
							</template>					
						</el-table-column>
					</el-table>		
				</div>
			</template>
			<template>
				<div class="box-content">													
					<h1 style="margin:10px 0">课程阶段：案例分析模块儿</h1>
					<el-table :data="courseStages[1].stageUnits"  height="200"  style="width: 100%"> 
						<el-table-column  type="index" width='80'>
						</el-table-column>						 	
					 	<el-table-column prop="name" label="作业所属小节">
					    </el-table-column>
					 	<el-table-column  label="作业对象">
					 		<template scope="scope">
					 			<p>学生</p>
					 		</template>
					    </el-table-column>
					 	<el-table-column label="提交总数/未批改数">
					 		<template scope="scope">
					 			<p>{{scope.row.commitCount}}/{{scope.row.commitCount-scope.row.publishCount}}</p>
					 		</template>					 		
					    </el-table-column>
						<el-table-column label="操作">
							<template scope="scope">
								<el-button size="small" @click="skip('/coursetaskstage',$route.query.id,scope.row.unitId,'2')" type="primary">查看</el-button>
							</template>					
						</el-table-column>
					</el-table>	
				</div>
			</template>	
			<template>
				<div class="box-content">													
					<h1 style="margin:10px 0">课程阶段：沙盘推演模块儿</h1>
					<el-table :data="Tuistage" height="200"  style="width: 100%"> 
						<el-table-column  type="index" width='80'>
						</el-table-column>						 	
					 	<el-table-column label="作业所属小节">
					 		<template scope="scope">
					 			<p>沙盘推演</p>
					 		</template>					 		
					    </el-table-column>
					 	<el-table-column prop="name" label="作业对象">
					 		<template scope="scope">
					 			<p>小组</p>
					 		</template>						 		
					    </el-table-column>
					 	<el-table-column prop="name" label="提交总数/未批改数">
					 		<template scope="scope">
					 			<p>{{courseStages[2].commitCount}}/{{courseStages[2].commitCount-courseStages[2].publishCount}}</p>
					 		</template>						 		
					    </el-table-column>	
						<el-table-column label="操作">
							<template scope="scope">
								<el-button size="small"  @click="skip('/coursetaskstage',$route.query.id,courseStages[2].stageId,'3')" type="primary">查看</el-button>
							</template>					
						</el-table-column>
					</el-table>	
				</div>
			</template>		
			<template>
				<div class="box-content">													
					<h1 style="margin:0;margin-bottom: 10px;">项目路演模块儿</h1>
					<el-table :data="Tuistage" height="200"  style="width: 100%"> 
						<el-table-column  type="index" width='80'>
						</el-table-column>						 	
					 	<el-table-column label="作业所属小节">
					 		<template scope="scope">
					 			<p>项目路演</p>
					 		</template>					 		
					    </el-table-column>
					 	<el-table-column prop="name" label="作业对象">
					 		<template scope="scope">
					 			<p>小组</p>
					 		</template>						 		
					    </el-table-column>
					 	<el-table-column prop="name" label="提交总数/未批改数">
					 		<template scope="scope">
					 			<p>{{courseStages[3].commitCount}}/{{courseStages[3].commitCount-courseStages[3].publishCount}}</p>
					 		</template>						 		
					    </el-table-column>	
						<el-table-column label="操作">
							<template scope="scope">
								<el-button size="small" @click="skip('/coursetaskstage',$route.query.id,courseStages[3].stageId,'4')" type="primary">查看</el-button>
							</template>					
						</el-table-column>
					</el-table>	
				</div>
			</template>						
		</div>	
	
	</section>
</template>

<script>
  import {courseone} from '../../api/api'
  import ComFunJS from '../../common/js/util' 
  export default {
    data() {    	
      return {
		courseStages:[],
		Tuistage:[1],
		Roadstage:[1]
      }
    },
    methods: {	
	    skip(link,id,unitId,stage){
	        this.$router.push(
	        	{
	        		path:link,
	        		query:{
	        			id:id,
	        			unitId:unitId,
	        			stage:stage
	        		}
	        	}
	        )
	    },	
		getone:function(){
			var params=this.$route.query.id;
			var _this=this;
			courseone(params).then((res)=>{			
				_this.courseStages=res.courseStages;
			})
		},	    
    },
	mounted() {
		var _this=this;
		this.getone()
	}    
  }
</script>
<style>
</style>